package org.lingshi.common.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.lingshi.common.entity.Admin;
import org.lingshi.common.entity.Permission;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zhanlf
 * @since 2024-06-24
 */
public interface IAdminService {
    void add(Admin admin);

    void deleteById(Long id);

    void update(Admin admin);

    Admin findById(Long id);

    List<Admin> findAll();

    Page<Admin> search(int page, int size);

    void updateRoleToAdmin(Long aid, Long[] rid);


    // 根据用户名查询管理员

    Admin findByAdminName(String username);


    // 根据用户名查询所有权限

    List<Permission> findAllPermission(String username);
}
